<template>
  <div :class="['title-con', { hasIcon }]">
    <span> {{ title }}</span>
  </div>
</template>
<script>
export default {
  name: "TitleWithBg",
  props: {
    title: {
      default: "",
      type: String,
    },
    hasIcon: {
      default: false,
      type: Boolean,
    },
  },
  data() {
    return {};
  },
};
</script>
<style lang="scss" scoped>
.title-con {
  font-weight: 500;
  font-size: 28px;
  color: #ffffff;
  line-height: 50px;
  background: url(../../assets/images/title-icon-bg.png);
  background-size: 100% 100%;
  height: 59px;
  &.hasIcon {
    background-image: url(../../assets/images/title-icon-bg.png);
  }
}
</style>